package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 采购车
 */
@Data
@ApiModel(value = "采购车实体")
@TableName("t_buy")
public class BuyBean {
    @ApiModelProperty(hidden = true)
    @TableId(value = "pk_buyId",type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty(value = "采购价")
    @TableField("b_price")
    private Integer price;//采购价
    @ApiModelProperty(value = "采购数量")
    @TableField("b_num")
    private Integer num;//采购数量
    @ApiModelProperty(value = "商品外键")
    @TableField("fk_goodsId")
    private String fk_goodsId;//商品外键
    @ApiModelProperty(value = "库存商品对象")
    @TableField(exist = false)
    private GoodsBean goods;//库存商品对象
    @ApiModelProperty(value = "采购员编号")
    @TableField("fk_userId")
    private Integer fk_userId;//采购员编号

    public BuyBean() {
    }

    public BuyBean(Integer num, String fk_goodsId, Integer fk_userId) {
        this.num = num;
        this.fk_goodsId = fk_goodsId;
        this.fk_userId = fk_userId;
    }

    public BuyBean(Integer price, Integer num, String fk_goodsId, Integer fk_userId) {
        this.price = price;
        this.num = num;
        this.fk_goodsId = fk_goodsId;
        this.fk_userId = fk_userId;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public String getFk_goodsId() {
        return fk_goodsId;
    }

    public void setFk_goodsId(String fk_goodsId) {
        this.fk_goodsId = fk_goodsId;
    }

    public GoodsBean getGoods() {
        return goods;
    }

    public void setGoods(GoodsBean goods) {
        this.goods = goods;
    }

    public Integer getFk_userId() {
        return fk_userId;
    }

    public void setFk_userId(Integer fk_userId) {
        this.fk_userId = fk_userId;
    }

    @Override
    public String toString() {
        return "BuyBean{" +
                "id=" + id +
                ", price=" + price +
                ", num=" + num +
                ", fk_goodsId='" + fk_goodsId + '\'' +
                ", goods=" + goods +
                ", fk_userId=" + fk_userId +
                '}';
    }
}
